// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-11-22

#ifndef __TM_UPDATESVR_H_COMMON_SVR_BASE__
#define __TM_UPDATESVR_H_COMMON_SVR_BASE__

#pragma once

#include "base_timer.h"
#include "svr_asyncobj.h"

namespace JoyServer
{

class CJoyServer;
class CJoyAsyncQueue;

// update server informations.
// do following tasks :
//      server active time.
//      server messages.
class CJoyTmUpdateServer : public CJoyTimerObject
{
public:
    CJoyServer* m_server;
    CJoyAsyncQueue* m_asyncQueue;

    virtual void OnExecute();
public:
    CJoyTmUpdateServer();
    virtual ~CJoyTmUpdateServer();

    virtual bool Create(CJoyServer* pServer);
    virtual void Destroy();
};


} // namespace JoyServer

#endif  // __TM_UPDATESVR_H_COMMON_SVR_BASE__